<div class="users view">
    <h2><?php __('User'); ?></h2>
    <dl><?php $i = 0;
$class = ' class="altrow"'; ?>
        <dt<?php if ($i % 2 == 0)
    echo $class; ?>><?php __('Id'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
                echo $class; ?>>
<?php echo $user['User']['id']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
    echo $class; ?>><?php __('Name'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
    echo $class; ?>>
            <?php echo $user['User']['name']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
                echo $class; ?>><?php __('Group'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
                echo $class; ?>>
<?php echo $this->Html->link($user['Group']['name'], array('controller' => 'groups', 'action' => 'view', $user['Group']['id'])); ?>
            &nbsp;
        </dd>
    </dl>
    <div class="related">
        <h3><?php __('Related Accounts'); ?></h3>
<?php if (!empty($user['Account'])): ?>
            <table cellpadding = "0" cellspacing = "0">
                <tr>
                    <th><?php __('Id'); ?></th>
                    <th><?php __('User Id'); ?></th>
                    <th><?php __('Name'); ?></th>
                    <th><?php __('Account Number'); ?></th>
                    <th class="actions"><?php __('Actions'); ?></th>
                </tr>
                <?php
                $i = 0;
                foreach ($user['Account'] as $account):
                    $class = null;
                    if ($i++ % 2 == 0) {
                        $class = ' class="altrow"';
                    }
                    ?>
                    <tr<?php echo $class; ?>>
                        <td><?php echo $account['id']; ?></td>
                        <td><?php echo $account['user_id']; ?></td>
                        <td><?php echo $account['name']; ?></td>
                        <td><?php echo $account['account_number']; ?></td>
                        <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('controller' => 'accounts', 'action' => 'view', $account['id'])); ?>
        <?php echo $this->Html->link(__('Edit', true), array('controller' => 'accounts', 'action' => 'edit', $account['id'])); ?>
        <?php echo $this->Html->link(__('Delete', true), array('controller' => 'accounts', 'action' => 'delete', $account['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $account['id'])); ?>
                        </td>
                    </tr>
    <?php endforeach; ?>
            </table>
<?php endif; ?>

        <div class="actions">
            <ul>
                <li><?php echo $this->Html->link(__('New Account', true), array('controller' => 'accounts', 'action' => 'add')); ?> </li>
            </ul>
        </div>
    </div>
    <div class="related">
        <h3><?php __('Related Regular Transactions'); ?></h3>
<?php if (!empty($user['RegularTransaction'])): ?>
            <table cellpadding = "0" cellspacing = "0">
                <tr>
                    <th><?php __('Id'); ?></th>
                    <th><?php __('User Id'); ?></th>
                    <th><?php __('Account Id'); ?></th>
                    <th><?php __('Interval'); ?></th>
                    <th><?php __('Delay'); ?></th>
                    <th><?php __('Name'); ?></th>
                    <th><?php __('Amount'); ?></th>
                    <th class="actions"><?php __('Actions'); ?></th>
                </tr>
                <?php
                $i = 0;
                foreach ($user['RegularTransaction'] as $regularTransaction):
                    $class = null;
                    if ($i++ % 2 == 0) {
                        $class = ' class="altrow"';
                    }
                    ?>
                    <tr<?php echo $class; ?>>
                        <td><?php echo $regularTransaction['id']; ?></td>
                        <td><?php echo $regularTransaction['user_id']; ?></td>
                        <td><?php echo $regularTransaction['account_id']; ?></td>
                        <td><?php echo $regularTransaction['interval']; ?></td>
                        <td><?php echo $regularTransaction['delay']; ?></td>
                        <td><?php echo $regularTransaction['name']; ?></td>
                        <td><?php echo $regularTransaction['amount']; ?></td>
                        <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('controller' => 'regular_transactions', 'action' => 'view', $regularTransaction['id'])); ?>
        <?php echo $this->Html->link(__('Edit', true), array('controller' => 'regular_transactions', 'action' => 'edit', $regularTransaction['id'])); ?>
        <?php echo $this->Html->link(__('Delete', true), array('controller' => 'regular_transactions', 'action' => 'delete', $regularTransaction['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $regularTransaction['id'])); ?>
                        </td>
                    </tr>
    <?php endforeach; ?>
            </table>
<?php endif; ?>

        <div class="actions">
            <ul>
                <li><?php echo $this->Html->link(__('New Regular Transaction', true), array('controller' => 'regular_transactions', 'action' => 'add')); ?> </li>
            </ul>
        </div>
    </div>
    <div class="related">
        <h3><?php __('Related Transactions'); ?></h3>
<?php if (!empty($user['Transaction'])): ?>
            <table cellpadding = "0" cellspacing = "0">
                <tr>
                    <th><?php __('Id'); ?></th>
                    <th><?php __('User Id'); ?></th>
                    <th><?php __('Account Id'); ?></th>
                    <th><?php __('Name'); ?></th>
                    <th><?php __('Amount'); ?></th>
                    <th><?php __('Verified'); ?></th>
                    <th><?php __('Created'); ?></th>
                    <th><?php __('Updated'); ?></th>
                    <th><?php __('Regular Transaction Id'); ?></th>
                    <th><?php __('Post Date'); ?></th>
                    <th class="actions"><?php __('Actions'); ?></th>
                </tr>
                <?php
                $i = 0;
                foreach ($user['Transaction'] as $transaction):
                    $class = null;
                    if ($i++ % 2 == 0) {
                        $class = ' class="altrow"';
                    }
                    ?>
                    <tr<?php echo $class; ?>>
                        <td><?php echo $transaction['id']; ?></td>
                        <td><?php echo $transaction['user_id']; ?></td>
                        <td><?php echo $transaction['account_id']; ?></td>
                        <td><?php echo $transaction['name']; ?></td>
                        <td><?php echo $transaction['amount']; ?></td>
                        <td><?php echo $transaction['verified']; ?></td>
                        <td><?php echo $transaction['created']; ?></td>
                        <td><?php echo $transaction['updated']; ?></td>
                        <td><?php echo $transaction['regular_transaction_id']; ?></td>
                        <td><?php echo $transaction['post_date']; ?></td>
                        <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('controller' => 'transactions', 'action' => 'view', $transaction['id'])); ?>
        <?php echo $this->Html->link(__('Edit', true), array('controller' => 'transactions', 'action' => 'edit', $transaction['id'])); ?>
        <?php echo $this->Html->link(__('Delete', true), array('controller' => 'transactions', 'action' => 'delete', $transaction['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $transaction['id'])); ?>
                        </td>
                    </tr>
    <?php endforeach; ?>
            </table>
<?php endif; ?>
    </div>
</div>
